<template>
	<view>
		<view class="page-body">
			<view class="page-section page-section-gap">
				<map style="width: 100%; height: 300px;"  scale=6 :latitude="latitude" :longitude="longitude" :markers="covers">
				</map>
			</view>
			<view>
				<view class="detail-section">
					<view>参考位置：{{location}}</view>
					<view>发震时刻：{{time}}</view>
					<view>经度：{{latitude}}</view>
					<view>纬度：{{longitude}}</view>
					<view>震级：{{degree}}</view>
					<view>深度：{{depth}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: 0, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: 39.909,
				longitude: 116.39742,
				location:'',
				time:'',
				depth:'',
				degree:'',
				covers: []
			}
		},
		 onLoad: function (option) { //option为object类型，会序列化上个页面传递的参数
				this.longitude=option.j
				this.latitude=option.w
				this.location=option.location
				this.time=option.time
				this.depth =option.depth
				this.degree=option.degree
				this.covers=[]
				this.covers.push({
					latitude: option.w,
					longitude: option.j,
					iconPath: 'http://data.earthquake.cn/img/map/5.gif',
				})
			},
		methods: {

		}
	}
</script>

<style>
	.detail-section{
		margin: 10rpx 10rpx;
	}
</style>
